package com.ys.erp.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

/**
 * @author lwj
 * @date 2024/9/4
 */

public class StatusEnum {

    @AllArgsConstructor
    @Getter
    public enum Enums {
        //用户猫咪状态
        USER_CAT_PREDETERMINE,
        USER_CAT_TAKE,
        USER_CAT_RETURN,
        USER_CAT_RETURN_PRE,
        USER_CAT_RETURN_ORDER,

        //支付状态
        PAY_UN_PAY,
        PAY_PAYING,
        PAY_SUCCESS,
        PAY_FAIL,
        PAY_CANCLE,

        //合同签署状态
        CONTARCT_TO_BE_SIGNED,
        CONTARCT_SIGNED_SUCCESS,
        CONTARCT_SIGNED_CANCEL,


        HEALTH_NONE,
        HEALTH_MILD,
        HEALTH_MODERATE,
        HEALTH_SEVERE,

        //续约状态
        RENEWAL_SUCCESSFUL,
        T0_BE_RENEWAL,

        COOPERATION_EXPIRES,
        COOPERATION_NORMAL,

        NOTICE_PENDING,
        NOTICE_PUBLISHED,
        NOTICE_OFFLINE,

        WRITE_ON,
        WRITE_OFF,
        ;

    }

    public static final Map<String, String> ENUM_MAP = new HashMap<>();

    static {
        ENUM_MAP.put(Enums.USER_CAT_PREDETERMINE.toString(), "预定");
        ENUM_MAP.put(Enums.USER_CAT_TAKE.toString(), "已接走");
        ENUM_MAP.put(Enums.USER_CAT_RETURN.toString(), "送回");
        ENUM_MAP.put(Enums.USER_CAT_RETURN_PRE.toString(), "退定");
        ENUM_MAP.put(Enums.USER_CAT_RETURN_ORDER.toString(), "退猫");

        ENUM_MAP.put(Enums.PAY_UN_PAY.toString(), "待支付");
        ENUM_MAP.put(Enums.PAY_PAYING.toString(), "支付中");
        ENUM_MAP.put(Enums.PAY_SUCCESS.toString(), "支付成功");
        ENUM_MAP.put(Enums.PAY_FAIL.toString(), "支付失败");
        ENUM_MAP.put(Enums.PAY_CANCLE.toString(), "取消支付");

        ENUM_MAP.put(Enums.CONTARCT_TO_BE_SIGNED.toString(), "待签署");
        ENUM_MAP.put(Enums.CONTARCT_SIGNED_SUCCESS.toString(), "已签署");
        ENUM_MAP.put(Enums.CONTARCT_SIGNED_CANCEL.toString(), "已取消");

        ENUM_MAP.put(Enums.RENEWAL_SUCCESSFUL.toString(), "续约成功");
        ENUM_MAP.put(Enums.T0_BE_RENEWAL.toString(), "续约中");

        ENUM_MAP.put(Enums.COOPERATION_EXPIRES.toString(), "合作过期");
        ENUM_MAP.put(Enums.COOPERATION_NORMAL.toString(), "合作正常");

        ENUM_MAP.put(Enums.WRITE_ON.toString(), "允许核销");
        ENUM_MAP.put(Enums.WRITE_OFF.toString(), "禁止核销");


        ENUM_MAP.put(Enums.NOTICE_PENDING.name(), "待发布");
        ENUM_MAP.put(Enums.NOTICE_PUBLISHED.name(), "已发布");
        ENUM_MAP.put(Enums.NOTICE_OFFLINE.name(), "已下架");

        ENUM_MAP.put(Enums.HEALTH_NONE.name(), "无");
        ENUM_MAP.put(Enums.HEALTH_MILD.name(), "轻微");
        ENUM_MAP.put(Enums.HEALTH_MODERATE.name(), "中度");
        ENUM_MAP.put(Enums.HEALTH_SEVERE.name(), "严重");

    }

    public static boolean isContainsKey(String url) {
        return ENUM_MAP.containsKey(url);
    }

}
